package com.java2007.service;

import com.java2007.pojo.FoodType;

import java.sql.SQLException;
import java.util.List;

/**
 * 菜类别业务接口
 * @author ZOU
 */
public interface FoodTypeService {
    /**
     * 查询全部
     * @return
     */
    List<FoodType> findAll() throws SQLException;

    /**
     * 根据名字查询
     * @return
     */
    List<FoodType> findByFoodTypeName(String keyword) throws SQLException;

    /**
     * 根据ID删除
     * @param typeId
     * @return
     * @throws SQLException
     */
    int deleteByFoodTypeId(Integer typeId) throws SQLException;

    /**
     * 根据名字添加
     * @param typeName
     * @return
     * @throws SQLException
     */
    int saveByFoodTypeName(String typeName) throws SQLException;

    /**
     * 根据id查询
     * @param typeId
     * @return
     * @throws SQLException
     */
    FoodType findByFoodTypeId(int typeId) throws SQLException ;

    /**
     * 修改
     * @param foodType
     * @return
     * @throws SQLException
     */
    int updata(FoodType foodType) throws SQLException ;
}
